package com.lc.user.express.httpserver;

import com.zcx.helper.http.AsyCallBack;
import com.zcx.helper.http.note.HttpInlet;

import org.json.JSONObject;

/**
 * Created by Administrator on 2016/4/5.重置密码
 */
@HttpInlet(Net.GET_UPDATE_PWD)
public class GetUpdatePayPwd extends ZJDBAsyGet<Object> {
    public String userid;
    public String oldpaypwd;
    public String newpaypwd;

    public GetUpdatePayPwd(String userid,String oldpaypwd,String newpaypwd,AsyCallBack listener) {
        super(listener);
        this.userid = userid;
        this.oldpaypwd = oldpaypwd;
        this.newpaypwd = newpaypwd;
    }

    @Override
    protected Object parser(JSONObject object) {
        if (object.optInt("message") == 1) {

            TOAST = "重置密码成功";
            return "1";
        }else if(object.optInt("message") == 2){
            TOAST = "旧密码错误";
        }else if(object.optInt("message") == 3){
            TOAST = "新密码与旧密码相同";
        }else {
            TOAST = "重置密码失败";
        }
        return null;
    }
}
